package org.demo.vo.daomapping;

import org.demo.vo.bean.BoolStr;
import org.telosys.persistence.mapping.AttributeMapping;
import org.telosys.persistence.mapping.BooleanMappedToString;
import org.telosys.persistence.mapping.EntityMapping;

public class BoolStrMapping extends EntityMapping<BoolStr>
{
	private final static Class<BoolStr> entityClass = BoolStr.class ;

	private final static String   table   = "BOOLSTR" ;

	private final static String   schema  = "ROOT" ;  // Can be null if not required by the database
	
	private final static AttributeMapping[] attributesMapping = new AttributeMapping[]
	{
		new AttributeMapping("id",    "ID",     true,  false, 0 ),  // PK
		new AttributeMapping("name",  "NAME",   false, false, 0 ),
		new AttributeMapping("flag",  "FLAG",   false, false, 0, new BooleanMappedToString("T","F") )
	};
	
	public BoolStrMapping() 
	{
		super(entityClass, table, schema, attributesMapping, null, null );
	}

}
